# 1.导入库
import pymysql

# 2.建立连接
def get_conn():
    conn = pymysql.connect(
        host="mysql.hogwarts.ceshiren.com",
        port=3306,
        user="stu",
        password="hogwarts_stu",
        database="hogwarts_stu",
        charset="utf8mb4"
    )
    return conn